package app.common.dao;
import java.util.ArrayList;
import java.util.List;

import cn.lily.com.container.data.Record;
import cn.lily.com.exception.YaconException;
import cn.lily.esb.framework.drivers.db.bean.ControlDAO;
public class Leo_can_infoBean extends ControlDAO implements Cloneable {
	private static final long serialVersionUID = 1L;
	public Leo_can_infoBean() throws YaconException {
		super();
		setTableName("LEO_CAN_INFO");
	}
	String  fcan_nam_jap;
	String  fcan_name;
	String  fcan_name_memo;
	String  fupdate_time;
	String  fcan_first;
	String  fcan_name_other;
	String  fcan_area;
	String  fcan_nam_eng;
	String  fcreate_time;
	String  fcan_source;
	String  fcan_total;
	String  fcan_id;
	String  fcan_size;
	String  fcan_demo;

	public void setCan_nam_jap( String can_nam_jap)throws YaconException{
		setFieldData("can_nam_jap",can_nam_jap,TEXT);
		this.fcan_nam_jap=can_nam_jap;
	}

	public String getCan_nam_jap(){
		if ( this.fcan_nam_jap == null){
			return "";
		}
		else {
			return this.fcan_nam_jap;
		}
	}

	public void setCan_name( String can_name)throws YaconException{
		setFieldData("can_name",can_name,TEXT);
		this.fcan_name=can_name;
	}

	public String getCan_name(){
		if ( this.fcan_name == null){
			return "";
		}
		else {
			return this.fcan_name;
		}
	}

	public void setCan_name_memo( String can_name_memo)throws YaconException{
		setFieldData("can_name_memo",can_name_memo,TEXT);
		this.fcan_name_memo=can_name_memo;
	}

	public String getCan_name_memo(){
		if ( this.fcan_name_memo == null){
			return "";
		}
		else {
			return this.fcan_name_memo;
		}
	}

	public void setUpdate_time( String update_time)throws YaconException{
		setFieldData("update_time",update_time,DATE);
		this.fupdate_time=update_time;
	}

	public String getUpdate_time(){
		if ( this.fupdate_time == null){
			return "";
		}
		else {
			return this.fupdate_time;
		}
	}

	public void setCan_first( String can_first)throws YaconException{
		setFieldData("can_first",can_first,TEXT);
		this.fcan_first=can_first;
	}

	public String getCan_first(){
		if ( this.fcan_first == null){
			return "";
		}
		else {
			return this.fcan_first;
		}
	}

	public void setCan_name_other( String can_name_other)throws YaconException{
		setFieldData("can_name_other",can_name_other,TEXT);
		this.fcan_name_other=can_name_other;
	}

	public String getCan_name_other(){
		if ( this.fcan_name_other == null){
			return "";
		}
		else {
			return this.fcan_name_other;
		}
	}

	public void setCan_area( String can_area)throws YaconException{
		setFieldData("can_area",can_area,TEXT);
		this.fcan_area=can_area;
	}

	public String getCan_area(){
		if ( this.fcan_area == null){
			return "";
		}
		else {
			return this.fcan_area;
		}
	}

	public void setCan_nam_eng( String can_nam_eng)throws YaconException{
		setFieldData("can_nam_eng",can_nam_eng,TEXT);
		this.fcan_nam_eng=can_nam_eng;
	}

	public String getCan_nam_eng(){
		if ( this.fcan_nam_eng == null){
			return "";
		}
		else {
			return this.fcan_nam_eng;
		}
	}

	public void setCreate_time( String create_time)throws YaconException{
		setFieldData("create_time",create_time,DATE);
		this.fcreate_time=create_time;
	}

	public String getCreate_time(){
		if ( this.fcreate_time == null){
			return "";
		}
		else {
			return this.fcreate_time;
		}
	}

	public void setCan_source( String can_source)throws YaconException{
		setFieldData("can_source",can_source,TEXT);
		this.fcan_source=can_source;
	}

	public String getCan_source(){
		if ( this.fcan_source == null){
			return "";
		}
		else {
			return this.fcan_source;
		}
	}

	public void setCan_total( String can_total)throws YaconException{
		setFieldData("can_total",can_total,TEXT);
		this.fcan_total=can_total;
	}

	public String getCan_total(){
		if ( this.fcan_total == null){
			return "";
		}
		else {
			return this.fcan_total;
		}
	}

	public void setCan_id( String can_id)throws YaconException{
		setFieldData("can_id",can_id,TEXT);
		this.fcan_id=can_id;
	}

	public String getCan_id(){
		if ( this.fcan_id == null){
			return "";
		}
		else {
			return this.fcan_id;
		}
	}

	public void setCan_size( String can_size)throws YaconException{
		setFieldData("can_size",can_size,TEXT);
		this.fcan_size=can_size;
	}

	public String getCan_size(){
		if ( this.fcan_size == null){
			return "";
		}
		else {
			return this.fcan_size;
		}
	}

	public void setCan_demo( String can_demo)throws YaconException{
		setFieldData("can_demo",can_demo,TEXT);
		this.fcan_demo=can_demo;
	}

	public String getCan_demo(){
		if ( this.fcan_demo == null){
			return "";
		}
		else {
			return this.fcan_demo;
		}
	}

	public  List<Leo_can_infoBean> findListBeans(String sSqlWhere)throws YaconException {
		List<Leo_can_infoBean> listBeans = new ArrayList<Leo_can_infoBean>();
		findTable = findTableByWhere(sSqlWhere);
		while (findTable.next())
		{
			Leo_can_infoBean fDaoBean  = new Leo_can_infoBean();
			fDaoBean.fcan_nam_jap = findTable.getString("can_nam_jap");
			fDaoBean.fcan_name = findTable.getString("can_name");
			fDaoBean.fcan_name_memo = findTable.getString("can_name_memo");
			fDaoBean.fupdate_time = findTable.getString("update_time");
			fDaoBean.fcan_first = findTable.getString("can_first");
			fDaoBean.fcan_name_other = findTable.getString("can_name_other");
			fDaoBean.fcan_area = findTable.getString("can_area");
			fDaoBean.fcan_nam_eng = findTable.getString("can_nam_eng");
			fDaoBean.fcreate_time = findTable.getString("create_time");
			fDaoBean.fcan_source = findTable.getString("can_source");
			fDaoBean.fcan_total = findTable.getString("can_total");
			fDaoBean.fcan_id = findTable.getString("can_id");
			fDaoBean.fcan_size = findTable.getString("can_size");
			fDaoBean.fcan_demo = findTable.getString("can_demo");
			fDaoBean.operate_mode = "edit";
			listBeans.add(fDaoBean);
		}
		return listBeans;
	}

	public Leo_can_infoBean findBean(String sSqlWhere)throws YaconException {
		findTable = findTableByWhere(sSqlWhere);
		if (findTable.next())
		{
			Leo_can_infoBean fDaoBean  = new Leo_can_infoBean();
			fDaoBean.fcan_nam_jap = findTable.getString("can_nam_jap");
			fDaoBean.fcan_name = findTable.getString("can_name");
			fDaoBean.fcan_name_memo = findTable.getString("can_name_memo");
			fDaoBean.fupdate_time = findTable.getString("update_time");
			fDaoBean.fcan_first = findTable.getString("can_first");
			fDaoBean.fcan_name_other = findTable.getString("can_name_other");
			fDaoBean.fcan_area = findTable.getString("can_area");
			fDaoBean.fcan_nam_eng = findTable.getString("can_nam_eng");
			fDaoBean.fcreate_time = findTable.getString("create_time");
			fDaoBean.fcan_source = findTable.getString("can_source");
			fDaoBean.fcan_total = findTable.getString("can_total");
			fDaoBean.fcan_id = findTable.getString("can_id");
			fDaoBean.fcan_size = findTable.getString("can_size");
			fDaoBean.fcan_demo = findTable.getString("can_demo");
			fDaoBean.operate_mode = "edit";
			return fDaoBean;
		}else
			return null;
	}

	public void setViewRecord(Record viewRecord) throws YaconException{
		if (viewRecord.getString("can_nam_jap") != null)
			setCan_nam_jap(viewRecord.getString("can_nam_jap"));
		if (viewRecord.getString("can_name") != null)
			setCan_name(viewRecord.getString("can_name"));
		if (viewRecord.getString("can_name_memo") != null)
			setCan_name_memo(viewRecord.getString("can_name_memo"));
		if (viewRecord.getString("update_time") != null)
			setUpdate_time(viewRecord.getString("update_time"));
		if (viewRecord.getString("can_first") != null)
			setCan_first(viewRecord.getString("can_first"));
		if (viewRecord.getString("can_name_other") != null)
			setCan_name_other(viewRecord.getString("can_name_other"));
		if (viewRecord.getString("can_area") != null)
			setCan_area(viewRecord.getString("can_area"));
		if (viewRecord.getString("can_nam_eng") != null)
			setCan_nam_eng(viewRecord.getString("can_nam_eng"));
		if (viewRecord.getString("create_time") != null)
			setCreate_time(viewRecord.getString("create_time"));
		if (viewRecord.getString("can_source") != null)
			setCan_source(viewRecord.getString("can_source"));
		if (viewRecord.getString("can_total") != null)
			setCan_total(viewRecord.getString("can_total"));
		if (viewRecord.getString("can_id") != null)
			setCan_id(viewRecord.getString("can_id"));
		if (viewRecord.getString("can_size") != null)
			setCan_size(viewRecord.getString("can_size"));
		if (viewRecord.getString("can_demo") != null)
			setCan_demo(viewRecord.getString("can_demo"));
	}

}
